@echo off
echo Setting up remote repository and pushing to Gitee...
cd /d "C:\Users\Administrator\Documents\trae_projects\lt00001\magazine"

REM Set Git command path
set GIT_CMD="C:\Program Files\Git\cmd\git.exe"

echo Please provide your Gitee repository URL:
echo Example: https://gitee.com/username/repository-name.git
echo.
set /p REPO_URL="Enter your Gitee repository URL: "

if "%REPO_URL%"=="" (
    echo No repository URL provided. Exiting.
    pause
    exit /b 1
)

echo.
echo Adding remote repository...
%GIT_CMD% remote add origin %REPO_URL%
echo.

echo Checking remote configuration...
%GIT_CMD% remote -v
echo.

echo Pushing to remote repository...
%GIT_CMD% push -u origin master
echo.

echo Code has been pushed to your Gitee repository!
echo.
pause